<template>
    
    <p>
        <input type="radio" value="male" v-model="gender">男
        <input type="radio" value="female" v-model="gender">女
    </p>
    
    <p>
        <input type="checkbox" v-model="argee"  true-value="同意" false-value="不同意">我已阅读并{{argee}}《用户协议》
    </p>
    

    <p>
        <input type="text" v-model="firstName" size="5" placeholder="请输入您的姓名">
        <input type="text" v-model="lastName" size="10" placeholder="请输入您的姓名">
    </p>
    <p>输入的姓名为：{{ firstName + '　' + lastName }}</p>
    <p>输入的姓名为：{{ firstName }}</p>
</template>

<script>
export default {
    data(){
        return {
            gender: 'female',
            argee: false,

            firstName:'',
            lastName:'',
        }
    },
    computed:{
        fullName(){
            return this.firstName + '　' + this.lastName;
        },
        reversedMessage1(){
            return this.fullName.split('').reverse().join('');
        },
        now1(){
            return new Date().toLocaleString();
        },
    },
    methods:{
        reversedMessage2(){
            return this.fullName.split('').reverse().join('');
        },
        now2(){
            return new Date().toLocaleString();
    },
},
created(){
    setInterval(() => {
        console.log('计算属性：',this.now1);
        console.log('方法',this.now2);
        
    },1)
}
}
</script>